/* Message App 样式 */

/* 消息列表样式 */
.messages-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 0; /* 移除顶部padding，因为不再有内部header */
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #cec5c0 0%, #cebaab 100%);
  color: #333;
  border-radius: 20px 20px 0 0;
}

.messages-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.add-friend-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.add-friend-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.add-friend-btn:active {
  transform: translateY(0);
}

/* 消息列表容器 - 紧贴边缘，添加底部内边距防止遮挡 */
.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 20px 0; /* 添加底部内边距，防止条目被手机外壳遮挡 */
}

/* 消息条目 - 紧凑布局，完全透明背景 */
.message-item {
  display: flex;
  align-items: center;
  padding: 8px 12px; /* 减少内边距，使布局更紧凑 */
  border-radius: 0; /* 移除圆角，让条目紧贴边缘 */
  margin-bottom: 0; /* 移除间距 */
  background: transparent; /* 完全透明背景 */
  backdrop-filter: none; /* 移除磨砂效果 */
  -webkit-backdrop-filter: none; /* Safari兼容 */
  border: none; /* 移除边框 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* 保留白色分隔线 */
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

/* 最后一个条目不显示底部分隔线 */
.message-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* 恢复淡边框 */
}

/* 悬停效果 - 完全透明背景 */
.message-item:hover {
  background: rgba(255, 255, 255, 0.05); /* 悬停时轻微半透明 */
  transform: none; /* 移除Y轴移动，避免布局跳动 */
}

.message-item:active {
  background: rgba(255, 255, 255, 0.1); /* 点击时轻微半透明 */
  transform: scale(0.98); /* 轻微缩放反馈 */
}

/* 头像 - 与聊天详情页保持一致，强制覆盖scale变换 */
.message-avatar {
  width: 40px !important; /* 强制设置为40px，不受scale影响 */
  height: 40px !important;
  min-width: 40px !important; /* 防止被压缩 */
  max-width: 40px !important; /* 防止被放大 */
  min-height: 40px !important;
  max-height: 40px !important;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 10px;
  flex-shrink: 0; /* 防止头像被压缩 */
}

.message-content {
  flex: 1;
  min-width: 0; /* 允许内容被压缩 */
  overflow: hidden; /* 防止内容溢出 */
}

/* 好友名称 - 纯净文字，无阴影效果 */
.message-name {
  font-size: 15px; /* 从16px稍微减小 */
  font-weight: 600;
  color: var(--message-text-color, #000); /* 使用CSS变量控制颜色，默认黑色 */
  margin-bottom: 2px; /* 从5px减小到2px */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 消息预览文本 */
.message-text {
  font-size: 13px; /* 从14px稍微减小 */
  color: var(--message-text-color, #333); /* 使用CSS变量控制颜色，默认深灰色 */
  margin-bottom: 0; /* 移除底部边距 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* 删除时间显示 - 不再显示时间戳 */
.message-time {
  display: none; /* 完全隐藏时间显示 */
}

/* 群聊标识样式 */
.group-badge {
  display: inline-block;
  background: rgba(76, 175, 80, 0.8); /* 绿色半透明背景 */
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 500;
  text-shadow: none; /* 移除文字阴影 */
}

/* 群成员信息 */
.group-members-info {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.member-count {
  font-size: 10px;
  color: var(--message-text-color, #666); /* 使用CSS变量控制颜色 */
  background: rgba(255, 255, 255, 0.15); /* 降低背景透明度 */
  padding: 2px 6px;
  border-radius: 8px;
  min-width: 20px;
  text-align: center;
}

/* 好友条目和群聊条目的特殊样式 */
.friend-item {
  /* 好友条目保持默认样式 */
}

.group-item {
  /* 群聊条目与好友条目使用相同的透明背景 */
  background: transparent;
}

.group-item:hover {
  background: rgba(255, 255, 255, 0.05); /* 与好友条目相同的悬停效果 */
}

/* 文字颜色切换按钮样式 */
.text-color-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
  font-weight: 500;
}

/* 默认按钮文字颜色（显示"黑"时） */
.text-color-toggle {
  color: #000; /* 黑色文字 */
}

/* 当按钮显示"白"时，文字也是黑色（因为header背景是白色） */
.text-color-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.text-color-toggle:active {
  transform: scale(0.95);
}

/* 文字颜色主题 */
:root {
  --message-text-color: #000; /* 默认黑色 */
}

/* 白色文字主题 */
.text-color-white {
  --message-text-color: #fff;
}

/* 黑色文字主题 */
.text-color-black {
  --message-text-color: #000;
}

/* 群聊标识样式 */
.group-badge {
  display: inline-block;
  background: rgba(76, 175, 80, 0.8); /* 绿色半透明背景 */
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 500;
  text-shadow: none; /* 移除文字阴影 */
}

/* 群成员信息 */
.group-members-info {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.member-count {
  font-size: 10px;
  color: #666;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 6px;
  border-radius: 8px;
  min-width: 20px;
  text-align: center;
}

/* 好友条目和群聊条目的特殊样式 - 重复定义已删除 */

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.empty-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
}

.empty-hint {
  font-size: 14px;
  color: #999;
}

/* 添加好友界面样式 */
.add-friend-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 0; /* 移除顶部padding，因为不再有内部header */
}

/* 保留原有的add-friend-header样式以防后续需要，但目前不会被使用 */
.add-friend-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #cec5c0;
  color: #333;
  border-radius: 20px 20px 0 0;
}

.add-friend-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 8px 12px;
  border-radius: 15px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.add-friend-form {
  flex: 1;
  padding: 30px 20px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  color: #333;
}

.form-input:focus {
  outline: none;
  border-color: #9291a3;
  box-shadow: 0 0 0 3px rgba(146, 145, 163, 0.1);
}

.form-input::placeholder {
  color: #999;
}

.add-friend-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #9291a3 0%, #cec5c0 100%);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.add-friend-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.add-friend-submit:active {
  transform: translateY(0);
}

.add-friend-tips {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 0 0 20px 20px;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
}

.tip-item:last-child {
  margin-bottom: 0;
}

.tip-icon {
  font-size: 16px;
}

/* 消息提示样式 */
.message-toast {
  border-radius: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.message-toast.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.message-toast.error {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.message-toast.warning {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.message-toast.info {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

/* 响应式设计 */
@media (max-width: 480px) {
  .messages-header {
    padding: 12px 15px;
  }

  .add-friend-form {
    padding: 20px 15px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .message-item {
    padding: 8px;
  }

  .message-avatar {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

/* 动画效果 */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.add-friend-app {
  animation: slideInFromRight 0.3s ease-out;
}

.messages-app {
  animation: slideInFromLeft 0.3s ease-out;
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 美化滚动条 */
.message-list::-webkit-scrollbar {
  width: 6px;
}

.message-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.message-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.message-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Tab导航样式 */
.tab-navigation {
  display: flex !important; /* 强制显示 */
  background: #f8f9fa;
  border-radius: 0;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative; /* 确保定位正确 */
  z-index: 10; /* 确保在其他元素之上 */
  min-height: 48px; /* 最小高度 */
  width: 100%; /* 确保宽度正确 */
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex !important; /* 强制显示 */
  align-items: center;
  color: #666;
  min-height: 24px; /* 最小高度 */
  opacity: 1 !important; /* 强制可见 */
  visibility: visible !important; /* 强制可见 */
  justify-content: center;
}

.tab-btn:hover {
  background: rgba(146, 145, 163, 0.1);
  color: #9291a3;
}

.tab-btn.active {
  background: linear-gradient(135deg, #9291a3 0%, #cebaab 100%) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(146, 145, 163, 0.3);
  border-bottom: none !important;
}
.tab-btn.active span {
  color: white !important;
}
.tab-icon {
  font-size: 16px;
  display: inline-block !important; /* 强制显示 */
}

/* 防御性样式 - 确保add-friend-app容器不会隐藏tab导航 */
.add-friend-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.add-friend-app > .tab-navigation {
  flex-shrink: 0; /* 防止被压缩 */
  order: 1; /* 确保显示顺序 */
}

.add-friend-app > .m-tab-content {
  flex: 1;
  order: 2; /* 确保显示顺序 */
  overflow-y: auto;
}

/* 删除好友相关样式 */
.delete-friend-content {
  padding: 0 20px 20px 20px;
}

.delete-friend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  padding: 15px;
  background: #fff3cd;
  border-radius: 12px;
  border: 1px solid #ffeaa7;
}

.delete-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #856404;
  font-weight: 500;
}

.delete-icon {
  font-size: 16px;
}

.refresh-friend-list {
  padding: 8px 12px;
  background: linear-gradient(135deg, #cebaab 0%, #9291a3 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.refresh-friend-list:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.refresh-icon {
  font-size: 14px;
}

.delete-friend-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.delete-friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: white;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.delete-friend-item:hover {
  border-color: #9291a3;
  box-shadow: 0 4px 12px rgba(146, 145, 163, 0.1);
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.friend-details {
  flex: 1;
}

.friend-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.friend-id {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.friend-time {
  font-size: 12px;
  color: #999;
}

.delete-friend-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.delete-friend-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.delete-friend-btn:active {
  transform: translateY(0);
}

.delete-friend-tips {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
}

.delete-friend-tips .tip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.delete-friend-tips .tip-item:last-child {
  margin-bottom: 0;
}

/* 状态样式 */
.loading-state,
.empty-state,
.error-state {
  padding: 40px 20px;
  text-align: center;
}

.loading-state .loading-icon,
.empty-state .empty-icon,
.error-state .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.loading-state .loading-text,
.empty-state .empty-text,
.error-state .error-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
}

.empty-state .empty-hint,
.error-state .error-details {
  font-size: 14px;
  color: #999;
}

/* 错误状态样式增强 */
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.error-state .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.error-state .error-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #dc3545;
}

.error-state .error-details {
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
  word-break: break-word;
}

.error-state .error-hint {
  font-size: 14px;
  color: #999;
}

/* 响应式设计 - Tab */
@media (max-width: 480px) {
  .tab-navigation {
    padding: 3px;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .tab-icon {
    font-size: 14px;
  }

  .delete-friend-content {
    padding: 0 15px 15px 15px;
  }

  .delete-friend-header {
    padding: 12px;
    margin-bottom: 15px;
  }

  .delete-friend-item {
    padding: 12px;
  }

  .friend-avatar {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .friend-name {
    font-size: 15px;
  }

  .friend-id {
    font-size: 13px;
  }

  .friend-time {
    font-size: 11px;
  }

  .delete-friend-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Tab按钮发送中状态 */
.send-message-btn.sending {
  background: #6c757d;
  cursor: not-allowed;
  pointer-events: none;
}

.send-message-btn.sending::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

/* 删除了message-list-footer和current-chat-info相关样式，因为不再需要这个提示组件 */

.chat-id {
  font-size: 12px;
  color: #666;
}

.chat-detail-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 15px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9291a3;
}

.chat-detail-btn:hover {
  background: #f5f5f5;
  border-color: #9291a3;
}

.detail-icon {
  font-size: 12px;
}

/* 好友选中状态 */
.message-item.selected {
  background: rgba(146, 145, 163, 0.1);
  border-color: #9291a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(146, 145, 163, 0.2);
}

.message-item.selected .friend-avatar {
  background: #9291a3;
  color: white;
  transform: scale(1.05);
}

.message-item.selected .friend-name {
  color: #9291a3;
  font-weight: 600;
}

/* 消息列表footer的发送区域样式 */
.message-list-footer .message-send-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 15px 20px;
  background: #fff;
  border-radius: 0 0 20px 20px;
}

.message-list-footer .send-input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-list-footer #message-send-input {
  width: 100%;
  min-height: 36px;
  max-height: 80px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 18px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.3s ease;
  outline: none;
}

.message-list-footer #message-send-input:focus {
  border-color: #9291a3;
  box-shadow: 0 0 0 2px rgba(146, 145, 163, 0.2);
}

.message-list-footer .send-tools {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.message-list-footer .send-tool-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.message-list-footer .send-tool-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.message-list-footer .send-message-btn {
  background: linear-gradient(135deg, #9291a3 0%, #cebaab 100%);
  color: white;
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 50px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-list-footer .send-message-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.message-list-footer .send-message-btn:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 字数统计在footer中的样式 */
.message-list-footer .char-count {
  font-size: 11px;
  color: #999;
  text-align: right;
  margin-top: 2px;
}

.message-list-footer .char-count.warning {
  color: #ffc107;
}

.message-list-footer .char-count.error {
  color: #dc3545;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .chat-selected {
    gap: 8px;
  }

  .chat-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .chat-name {
    font-size: 13px;
  }

  .chat-id {
    font-size: 11px;
  }

  .chat-detail-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .message-list-footer .message-send-area {
    flex-direction: column;
    gap: 8px;
    padding: 12px 15px;
  }

  .message-list-footer .send-tools {
    justify-content: center;
  }

  .message-list-footer .send-message-btn {
    width: 100%;
    height: 40px;
  }
}

/* 特殊面板样式 */
.special-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.special-panel-content {
  background: white;
  border-radius: 15px;
  padding: 20px;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 发送状态提示样式 */
.send-status-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  z-index: 10000;
  font-size: 14px;
  text-align: center;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

.send-status-toast.success {
  background: #28a745;
}

.send-status-toast.error {
  background: #dc3545;
}

.send-status-toast.warning {
  background: #ffc107;
  color: #212529;
}

/* 确保创建群聊内容区域正确显示 */
.create-group-form {
  padding: 20px;
}

.friends-selection-container {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

.friends-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  color: #333;
}
.member-name,
.select-all-friends {
  color: #333;
}
.friends-selection-list {
  max-height: 200px;
  overflow-y: auto;
}

.friend-selection-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  margin: 4px 0;
  transition: background-color 0.2s ease;
}

.friend-selection-item:hover {
  background-color: #f8f9fa;
}

.friend-checkbox {
  margin-right: 12px;
  flex-shrink: 0;
}

.friend-checkbox-input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.friend-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.friend-details {
  margin-left: 8px;
}

.selected-members {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  min-height: 50px;
  margin: 8px 0;
}

.selected-member {
  display: inline-block;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 16px;
  padding: 4px 12px;
  margin: 2px 4px;
  font-size: 14px;
}

.default-member {
  background: #fff3e0 !important;
  border-color: #ffb74d !important;
}

.member-type {
  color: #f57c00;
  font-size: 12px;
}

.create-group-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
  transition: all 0.3s ease;
}

.create-group-submit:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.create-group-tips {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
}

/* 删除群聊页面样式 */
.delete-group-content {
  padding: 0 20px 20px 20px;
}

.delete-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 15px;
  background: #fff3cd;
  border-radius: 12px;
  border: 1px solid #ffeaa7;
}

.delete-group-header .delete-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #856404;
  font-weight: 500;
}

.delete-group-header .delete-icon {
  font-size: 16px;
}

.refresh-group-list {
  padding: 8px 12px;
  background: linear-gradient(135deg, #cec5c0 0%, #9291a3 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.refresh-group-list:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.refresh-icon {
  font-size: 14px;
}

.delete-group-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.delete-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: white;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.delete-group-item:hover {
  border-color: #9291a3;
  box-shadow: 0 4px 12px rgba(146, 145, 163, 0.1);
}

.group-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.group-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.group-details {
  flex: 1;
  min-width: 0; /* 防止文本溢出 */
}

.group-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-id {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.group-members {
  font-size: 13px;
  color: #888;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-time {
  font-size: 12px;
  color: #999;
}

.delete-group-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.delete-group-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.delete-group-btn:active {
  transform: translateY(0);
}

.delete-group-btn .delete-icon {
  font-size: 16px;
}

.delete-group-tips {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
}

.delete-group-tips .tip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.delete-group-tips .tip-item:last-child {
  margin-bottom: 0;
}

.delete-group-tips .tip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* 响应式设计 - 删除群聊 */
@media (max-width: 480px) {
  .delete-group-content {
    padding: 0 15px 15px 15px;
  }

  .delete-group-header {
    padding: 12px;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .delete-group-header .delete-info {
    justify-content: center;
  }

  .refresh-group-list {
    align-self: center;
    padding: 10px 16px;
  }

  .delete-group-item {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .group-info {
    align-items: flex-start;
  }

  .group-avatar {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }

  .group-name {
    font-size: 15px;
  }

  .group-id {
    font-size: 13px;
  }

  .group-members {
    font-size: 12px;
  }

  .group-time {
    font-size: 11px;
  }

  .delete-group-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
  }

  .delete-group-tips {
    padding: 12px;
  }

  .delete-group-tips .tip-item {
    font-size: 12px;
  }
}
.message-sent .message-sender {
  display: none !important;
}
.message-received .message-meta {
  position: absolute;
  top: -24px;
}
.message-received {
  margin-top: 50px;
}
.tab-navigation span {
  font-size: 14px !important;
  color: #333 !important;
}
